package com.lhc.Homework1;

import java.util.*;


public class Student {

    public static void main(String[] args) {
        Map<String,Object> stu1=new LinkedHashMap<>();
        stu1.put("Num",1);
        stu1.put("Name","Zhangsan");
        stu1.put("Sex","男");
        stu1.put("Age",21);
        stu1.put("Score",77);
        Map<String,Object> stu2=new LinkedHashMap<>();
        stu2.put("Num",2);
        stu2.put("Name","lisi");
        stu2.put("Sex","女");
        stu2.put("Age",20);
        stu2.put("Score",88);
        Map<String,Object> stu3=new LinkedHashMap<>();
        stu3.put("Num",3);
        stu3.put("Name","WangWu");
        stu3.put("Sex","男");
        stu3.put("Age",19);
        stu3.put("Score",66);

        List<Map<String,Object>> lst=new ArrayList();

        lst.add(stu1);
        lst.add(stu2);
        lst.add(stu3);

        for (int i=0;i<lst.size();i++)
        {

            Map<String,Object> map0=lst.get(i);
            Set<String> setKeys = map0.keySet();
            Iterator<String> it1 = setKeys.iterator();
            while (it1.hasNext()){
                String key = it1.next();
                // 通过key从map中取出与key对应的value值
                System.out.print(map0.get(key)+"\t");
            }
            System.out.println();

        }



    }

}
